package com.ss.android.article.base.feature.update.a;

import com.ss.android.common.AbsApiThread;
import com.ss.android.newmedia.a.MediaItem;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

public abstract class a implements MediaItem {
    public final long i;
    public int j;
    public String k;
    public String l;
    public int m;
    public String n;
    public UserInfo o;
    public a$a p;
    public long modifyTime;
    public long r;
    public long s;
    public boolean t;
    private String a;
    public a(long arg4) {

        this.p = new a$a();
        this.i = arg4;
        String v0 = arg4 > 0 ? String.valueOf(arg4) : "";
        this.a = v0;
    }

    public abstract JSONObject a() throws JSONException;

    public boolean a(JSONObject arg7) {
        this.p.b = arg7.optLong("cursor");
        this.p.a = arg7.optString("reason");
        this.p.e = arg7.optInt("cell_type", 1);
        this.s = arg7.optLong("create_time");
        this.j = arg7.optInt("type");
        this.k = arg7.optString("content");
        this.l = arg7.optString("action_desc");
        this.m = arg7.optInt("device_type");
        this.n = arg7.optString("device_model");
        this.o = UserInfo.fromJO(arg7.optJSONObject("user"), false);
        this.modifyTime = arg7.optLong("modify_time");
        this.t = AbsApiThread.optBoolean(arg7, "is_pgc_author", false);
        if (this.modifyTime <= 0) {
            this.modifyTime = this.s;
        }

        return true;
    }

    public String getItemKey() {
        return this.a;
    }

    public boolean skipDedup() {
        return false;
    }

    public final class a$a {
        public final List f;
        public final List g;
        public String a;
        public long b;
        public int c;
        public int d;
        public int e;

        public a$a() {
            this.f = new ArrayList();
            this.g = new ArrayList();
        }
    }
}

